package com.ucode.application.vo.acis;

import com.ucode.acis.mode.FamousExpert;
import com.ucode.oss.model.FileInfo;

@SuppressWarnings("serial")
public class FamousExpertVo extends FamousExpert {

    private String coverUrl;
    
    private String coverName;

    public FamousExpertVo() {
        super();
    }
    
    public FamousExpertVo(FamousExpert famousExpert,FileInfo coverFile) {
        super();
        if(famousExpert != null){
            this.setId(famousExpert.getId());
            this.setCreatedTime(famousExpert.getCreatedTime());
            this.setUpdatedTime(famousExpert.getUpdatedTime());
            this.setDeltag(famousExpert.getDeltag());
            this.setName(famousExpert.getName());
            this.setNickname(famousExpert.getNickname());
            this.setPenName(famousExpert.getPenName());
            this.setHometown(famousExpert.getHometown());
            this.setBirthDate(famousExpert.getBirthDate());
            this.setDeathDate(famousExpert.getDeathDate());
            this.setEra(famousExpert.getEra());
            this.setEthnic(famousExpert.getEthnic());
            this.setCoverId(famousExpert.getCoverId());
            this.setSummary(famousExpert.getSummary());
            this.setIntro(famousExpert.getIntro());
            this.setSort(famousExpert.getSort());
        }
        if(coverFile != null){
            this.setCoverUrl(coverFile.getUrlprefix()+coverFile.getFilePath());
            this.setCoverName(coverFile.getSourceName());
        }
    }

    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }

    public String getCoverName() {
        return coverName;
    }

    public void setCoverName(String coverName) {
        this.coverName = coverName;
    }
}
